<%--
  Created by IntelliJ IDEA.
  User: 86138
  Date: 2022/4/9
  Time: 16:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    pageContext.setAttribute("APP_PATH",request.getContextPath());
%>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="${APP_PATH}/dist/js/jquery.min.js"></script>

    <!--阿里图标库-->
    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1632750_204xwxiwzht.css?1583918713" />

    <link type="text/css" rel="stylesheet" href="${APP_PATH}/dist/css/style1.css">

    <link type="text/css" rel="stylesheet" href="${APP_PATH}/dist/css/bootstrap.css">
</head>
<body>

<%--添加用户modal--%>
<div class="modal fade" id="addUserModal" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">用户添加</h4>
            </div>
            <div class="modal-body">
                <form method="post" name="form1" id="form1"
                      enctype="multipart/form-data">
                    <div class="form-group">
                        <label for="appName">软件名称</label>
                        <input type="text" class="form-control" id="appName"
                               name="appName" placeholder="***">
                    </div>
                    <div class="form-group">
                        <label for="state">审核</label>
                        <input type="text" autocomplete class="form-control"
                               name="state" id="state" placeholder="待审核" value="待审核" readonly="readonly">
                    </div>
                    <%--          <div class="form-group">
                                <label for="email">所属平台</label>
                                <input type="text" name="email" class="form-control"
                                       id="email" placeholder="通用">
                              </div>--%>
                    <div>
                        <label for="platform" id="platform">所属平台</label>
                        <input type="radio" name="platform" value="通用" />通用
                        <input type="radio" name="platform" value="手机" />手机
                        <input type="radio" name="platform" value="平板" />平板
                    </div>
                    <div class="form-group">
                        <label for="statusOfRelease">版本的发布状态</label>
                        <input type="text" name="statusOfRelease" class="form-control"
                               id="statusOfRelease" placeholder="预发布" value="预发布" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="file">上传文件</label>
                        <input type="file" name="file" id="file">
                        <p class="help-block"></p>
                    </div>
                    <div class="form-group">
                        <label for="apkName">apk名称</label>
                        <input type="text" name="apkName" class="form-control"
                               id="apkName" placeholder="***.apk">
                    </div>

                    <div class="form-group">
                        <label for="numberoftimes">下载次数</label>
                        <input type="text" name="numberoftimes" class="form-control"
                               id="numberoftimes" placeholder="0"  >
                    </div>
                    <div class="form-group">
                        <label for="apksize">文件大小</label>
                        <input type="text" name="apksize" class="form-control"
                               id="apksize" placeholder="10MB">
                    </div>
                    <div class="form-group">
                        <label for="apkedition">版本号</label>
                        <input type="text" name="apkedition" class="form-control"
                               id="apkedition" placeholder="1.0">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="saveUserBtn">保
                    存用户</button>
            </div>
        </div>
    </div>
</div>




<div class="body_con">
    <div class="body_top">开发者页面</div>
    <div class="body_left">
        <ul class="body_left_list">
            <li>
                <label>
                    <span>宣 传</span>
                    <i class="iconfont iconxiajiantou"></i>
                    <a href="javascript:;"></a>
                </label>
                <ul>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目1栏目1</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目2</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目3</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <label>
                    <span>服 务</span>
                    <i class="iconfont iconxiajiantou"></i>
                    <a href="javascript:;"></a>
                </label>
                <ul>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目1</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目2</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目3</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <label>
                    <span>营 销</span>
                    <i class="iconfont iconxiajiantou"></i>
                    <a href="javascript:;"></a>
                </label>
                <ul>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目1</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目2</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>二级栏目3</span>
                            <i class="iconfont iconyoujiantou"></i>
                            <a href="javascript:;"></a>
                        </label>
                        <ul>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <span>三级栏目</span>
                                    <i class="iconfont iconyoujiantou"></i>
                                    <a href="javascript:;"></a>
                                </label>
                                <ul>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                    <li>
                                        <label>
                                            <span>四级栏目</span>
                                            <i class="iconfont iconyoujiantou"></i>
                                            <a href="javascript:;"></a>
                                        </label>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="body_right">

        <div class="container">

            <div class="row">
                <h1 class="col-lg-6">APP列表</h1>
            </div>
            <div class="col-lg-2 col-lg-offset-4">
                <button  class="btn btn-primary" id="addBtn">
                    <span class="glyphicon glyphicon-plus"  id="addUserBtn">&nbsp;添加APP</span>
                </button>
            </div>
            <table class="table table-hover">
                <tr>
                    <th>APP编号</th>
                    <th>APP名称</th>
                    <th>所属平台</th>
                    <th>审核状态</th>
                    <th>发布状态</th>
                    <th>apk名称</th>
                    <th>下载次数</th>
                    <th>apk大小</th>
                    <th>apk版本</th>
                    <th>分类</th>
                    <th>操作</th>
                </tr>
                <tbody id="book_table">

                </tbody>
            </table>

            <div class="row">
                <div class="row">
                    <div class="col-lg-6" id="pageInfo">

                    </div>
                    <div class="col-lg-6" id="pageList">
                        <nav aria-label="Page navigation">
                            <ul class="pagination">

                            </ul>
                        </nav>
                    </div>
                </div>

            </div>

        </div>

    </div>
</div>

<script type="text/javascript" src="${APP_PATH}/dist/js/script.js"></script>

<script type="text/javascript" src="${APP_PATH}/dist/js/jquery-1.12.4(1).js"></script>
<%--bootstrap的插件是依赖于jQuery的--%>
<script type="text/javascript" src="${APP_PATH}/dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
    $(function () {
        goToPageNum(1);
    })
    //构建图书列表
    function build_books_table(data) {
        //清空历史数据
        $("#book_table").empty();
        var books = data.returnData.books.list;
        $.each(books,function (index,item) {
            //构建5个td 存放数据
            var id_td = $("<td></td>").append(item.id);
            var bookName_td = $("<td></td>").append(item.appName);
            var bookCounts_td = $("<td></td>").append(item.platforms.platform);
            var  detail_td = $("<td></td>").append(item.states.state);
            var  detail_ta = $("<td></td>").append(item.statusOfReleases.statusOfRelease);
            var  apkName_td = $("<td></td>").append(item.apks.apkName);
            var  numberoftimes_td = $("<td></td>").append(item.apks.numberoftimes);
            var  apksize_td = $("<td></td>").append(item.apks.apksize);
            var  apkedition_td = $("<td></td>").append(item.apks.apkedition);
            var fl_td=$("<select></select>")
                .append($("<option></option>").append("&nbsp;休闲游戏").addClass("state"))
                .append($("<option></option>").append("&nbsp;益智游戏").addClass("state"))
                .append($("<option></option>").append("&nbsp;棋牌游戏").addClass("state"))
                .append($("<option></option>").append("&nbsp;体育赛车").addClass("state"))
                .append($("<option></option>").append("&nbsp;动作射击").addClass("state"))
                .append($("<option></option>").append("&nbsp;掌上网游").addClass("state"))
                .append($("<option></option>").append("&nbsp;策略塔防").addClass("state"))
                .append($("<option></option>").append("&nbsp;角色扮演").addClass("state"))
                .append($("<option></option>").append("&nbsp;模拟经营 ").addClass("state"))
                .append($("<option></option>").append("&nbsp;音乐游戏 ").addClass("state"))
                .append($("<option></option>").append("&nbsp;输入法").addClass("state"))
                .append($("<option></option>").append("&nbsp;文件管理").addClass("state"))

            //操作列的td
            //编辑按钮
            var edit_btn = $("<button></button>").addClass("btn btn-sm btn-primary edit_btn").attr("data_id",item.bookId)
                .append($("<span></span>").addClass("glyphicon glyphicon-pencil")).append("&nbsp;修改")
            //删除按钮
            var del_btn = $("<button></button>").addClass("btn btn-sm btn-danger del_btn").attr("data_id",item.bookId)
                .append($("<span></span>").addClass("glyphicon glyphicon-trash")).append("&nbsp;删除")
            //将操作按钮放入操作的td列
            var ac =$("<td></td>").append(edit_btn).append(del_btn)

            //将4个td 放入一个tr里
            var tr = $("<tr></tr>")
                .append(id_td)
                .append(bookName_td)
                .append(bookCounts_td)
                .append(detail_td)
                .append(detail_ta)
                .append(apkName_td)
                .append(numberoftimes_td)
                .append(apksize_td)
                .append(apkedition_td)
                .append(fl_td)
                .append(ac);
            //将tr添加至tbody
            tr.appendTo($("#book_table"))
        })
    }
    //构建分页信息
    function build_books_info(data) {
        $("#pageInfo").empty();
        var pageInfo = data.returnData.books;
        //节点：元素节点(标签) 文本节点（text） 属性节点  注释
        $("#pageInfo").append("当前是第"+pageInfo.pageNum+"页  "+pageInfo.pageNum+"/ "+pageInfo.pages+"共"+pageInfo.total+"条信息")
    }
    //构建分页列表信息
    function build_books_list(data) {
        $(".pagination").empty();
        //获取分页信息
        var pageInfo = data.returnData.books;
        var ul = $(".pagination");
        //生成 首页  上一页的li
        var fristPageLi = createLi("首页");
        var prePageLi = createLi("&laquo;");
        if(!pageInfo.hasPreviousPage){
            fristPageLi.addClass("disabled")
            prePageLi.addClass("disabled")
        }else{
            //添加点击事件 跳转
            liClick(fristPageLi,1);
            liClick(prePageLi,pageInfo.pageNum-1);
        }
        ul.append(fristPageLi);
        ul.append(prePageLi);
        //页码列表
        $.each(pageInfo.navigatepageNums,function (index,item) {
            var li = createLi(item);
            liClick(li,item);
            li.appendTo(ul);
        })
        var nextPageLi = createLi("&raquo;");
        var lastPageLi = createLi("末页");
        if(!pageInfo.hasNextPage){
            nextPageLi.addClass("disabled")
            lastPageLi.addClass("disabled")
        }else{
            //添加点击事件 跳转
            liClick(nextPageLi,pageInfo.pageNum+1);
            liClick(lastPageLi,pageInfo.pages);
        }
        ul.append(nextPageLi);
        ul.append(lastPageLi);
    }
    //生成li
    function  createLi(str) {
        var li = $("<li></li>").append($("<a></a>").attr("href","#").append(str));
        return li;
    }
    //给生成的li添加点击事件
    function liClick(obj,pn) {
        obj.click(function () {
            goToPageNum(pn)
        })
    }
    function goToPageNum(pn) {
        $.ajax({
            url:"${APP_PATH}/Apk",
            data:"pageNum="+pn,
            type:"GET",
            success:function (data) {
                console.log(data)
                build_books_table(data);
                build_books_info(data);
                build_books_list(data);
            }
        })
    }
    //模态框
    $(function () {
        //点击天机用户  弹出没太空
        $("#addUserBtn").click(function () {
            $("#addUserModal").modal({
                backdrop: "static",//点击背景模态框不消失
                show: true
            })
        })
    })

    //发送添加请求
    $("#saveUserBtn").click(function () {
        //在es6  而是es2015 版本中加入了class的语法糖 创建对象可以使用 new 关键字了
        var formData=new FormData;
        var appName = $("#appName").val();
        var state = $("#state").val();
        var platform = $("#platform input").val();
        var statusOfRelease = $("#statusOfRelease").val();
        var apkName = $("#apkName").val();
        var numberoftimes = $("#numberoftimes").val();
        var apksize = $("#apksize").val();
        var apkedition = $("#apkedition").val();




        formData.append("file",$("#file")[0].files[0]);
        formData.append("appName",appName);
        formData.append("state",state);
        formData.append("platform",platform);
        formData.append("statusOfRelease",statusOfRelease);
        formData.append("apkName",apkName);
        formData.append("numberoftimes",numberoftimes);
        formData.append("apksize",apksize);
        formData.append("apkedition",apkedition);

        $.ajax({
            url:"${APP_PATH}/user",
            method:"POST",
            /*$("#form1").serialize()  普通字段是可以的*/
            data:formData,
            // 告诉jQuery不要去处理发送的数据
            processData : false,
            // 告诉jQuery不要去设置Content-Type请求头
            contentType : false,
            success:function (data) {
                console.log(data)
            },
            error:function (data) {
                console.log(data)
            }
        })
    })


</script>



</body>
</html>
